
export interface ExamParam{
    projectId:any
    levelId:any
    showingsId:any
    city:string
    amount:any
    courseIds:any
}

export interface SearchParam{
    projectId:any
    levelId:any
    showingsId:any
    name:string
    idCar:string
}


export interface SearchModel{
    admissionNum:string
    name:string
    courseDate:any
    score:any
}

export async function searchScoreApi(param:SearchParam){
    return usePost<SearchModel[]>('/order/searchCourseList',param)
}



export interface ProjectModel{
    id: any
    name: string
}
//报考项目
export async function projectListApi(){
    return useGet<ProjectModel[]>('/exam/projectLists')
}

export interface LevelModel{
    id: any
    name: string
    city:string
    amount:any
}
//报考等级
export async function levelListApi(projectId:number){
    return useGet<LevelModel[]>(`/exam/levelInfo/${projectId}`)
}

export interface ShowingsModel{
    id:any
    name:string
    city:string
}

//报考场次
export async function showingsListApi(projectId:number,levelId:number){
    return useGet<ShowingsModel[]>(`/exam/showingsLists/${projectId}/${levelId}`)
}

//生成报名签名
export async function signApi(param:ExamParam){
    return usePost<string>('/exam/sign',param)
}

export interface CourseModel{
    id:any
    name:string //模块
    courseDate:any //考试时间
    city:string //考试地点
    levelName:string //考试项目
    projectName:string
    amount:any

}
//考试项目
export async function courseListApi(showingsId:number){
    return useGet<CourseModel[]>(`/exam/courseLists/${showingsId}`)
}

export interface CourseParam{
    ids:any
}

export async function courseApi(ids:CourseParam){
    return usePost<CourseModel[]>('/exam/courseLists',ids)
}


//支付
export interface PayParam extends ExamParam{

    payType:any

}

export interface PayCodeModel{
    orderNo:string
    codeUrl:any
}

export async function payApi(param:PayParam){
    return usePost<PayCodeModel>('/exam/sendPayCode',param)
}



export interface CertificateParam{
    projectId:any
    levelId:any
    certificateIds:[]
    avatarImage:string
    fileList:FileImageParam[]
    payType:any
    amount:any
}

export interface FileImageParam{
    name:string
    url:string
}

export interface CertificateModel{
    id:any
    name:string 
}

export async function certificateApi(projectId:number){
    return useGet<CertificateModel[]>(`/exam/certificateList/${projectId}`)
}


export interface CertificateItemModel{
    projectName:string
    levelName:string
    name:string
    amount:any
    id:any
}

export async function certificateItemApi(param:CertificateParam){
    return usePost<CertificateItemModel[]>(`/exam/certificateLists`,param)
}


export interface AdmissionTicketModel{
    id:any
    name:string
    admissionNum:string
    egName:string
    idCard:string
    courseName:string
    courseDate:any
}

export async function admissionTicketApi(param:ExamParam){
    return usePost<any>(`/order/admissionTicketList`,param)
}


